package net.kucoe.grin.internal.interaction.exception;

/**
 * Thrown when invocation failed due to inappropriate parameter.
 * 
 * @author Vitaliy Basyuk
 */
public class ParameterRelatedException extends InteractionException {
    
    private static final long serialVersionUID = 5599606045638952843L;
    private final String parameter;
    
    /**
     * Constructs ParameterRelatedException.
     * 
     * @param parameter
     * @param message
     * @param cause
     */
    public ParameterRelatedException(final String parameter, final String message, final Throwable cause) {
        super(message, cause);
        this.parameter = parameter;
    }
    
    /**
     * Constructs ParameterRelatedException.
     * 
     * @param parameter
     * @param message
     */
    public ParameterRelatedException(final String parameter, final String message) {
        super(message);
        this.parameter = parameter;
    }
    
    /**
     * Returns the parameter String.
     * 
     * @return the parameter String.
     */
    public String getParameter() {
        return parameter;
    }
    
}
